package com.demo.rbactest.service.Impl;

import com.demo.rbactest.dao.UserDao;
import com.demo.rbactest.entity.User;
import com.demo.rbactest.service.UserService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    final
    UserDao userDao;

    public UserServiceImpl(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public List<User> list() {
        return userDao.list();
    }

    @Override
    public User getOne(User user) {
        return userDao.getOne(user);
    }

    @Override
    public List<String> getPermissions(Integer id) {
        return userDao.getPermissions(id);
    }

    @Override
    public Integer save(User test) {
        return userDao.save(test);
    }
}
